package com.design.pattern.observer.context;

public class Client {
    public static void main(String[] args) {
        Oauth oauth=new Oauth();
        oauth.setName("Panda");
        oauth.setMessage("学习设计模式");
        User u=new User();
        u.setName("小明");
        User u1=new User();
        u1.setName("小黑");
        OauthPushSubscribeContext oauthPushSubscribeContext=OauthPushSubscribeContext.getInstance();
        oauthPushSubscribeContext.addObserver(u);
        oauthPushSubscribeContext.addObserver(u1);
        oauthPushSubscribeContext.notifyObservers(oauth);
    }
}
